<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .pink {
            background-color: pink;
        }

        .big {
            width: 300px;
            height: 300px;
        }
    </style>
</head>
<body>
    <!-- 操作class -->
    <!-- 语法: :class="对象/数组" -->
    <!-- 
        适用场景: 一个类名,来回切换,tab导航栏
        <div class="box" :class="{类名1: 布尔值,类名2: 布尔值}"></div>

        适用场景: 批量添加或删除场景
        <div class="box" :class="[类名1, 类名2]"></div>
     -->

     <div id="app">
        <div class="box" :class="{pink: isTrue, big: true}">我是最棒的</div>
        <div class="box" :class="['pink', 'big']">我是最棒的</div>
     </div>
    <script src="./vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                isTrue: false
            }
        })
    </script>
</body>
</html>